//
//  NSParagraphStyle+Extension.h
//  XYTextView
//
//  Created by 学大教育 on 2020/8/4.
//  Copyright © 2020 jutuo. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSParagraphStyle (Extension)
/**
 Creates a new NSParagraphStyle object from the CoreText Style.
 
 @param CTStyle CoreText Paragraph Style.
 
 @return a new NSParagraphStyle
 */
+ (nullable NSParagraphStyle *)styleWithCTStyle:(CTParagraphStyleRef)CTStyle;

/**
 Creates and returns a CoreText Paragraph Style. (need call CFRelease() after used)
 */
- (nullable CTParagraphStyleRef)CTStyle CF_RETURNS_RETAINED;
@end

NS_ASSUME_NONNULL_END
